home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-07-22 | 14.4 KB | 343 lines | [TEXT/MWII] |
- 3/3/90 Some notes about the IFS Demo program.
-
- ========================================================================
- ABOUT THIS RUN-TIME REVIEW COPY - Version 2.1C for THINK C 4.0
- ========================================================================
- This run-time version of "IFS Decompression" is provided for your
- review as a standalone application. The source code for EARLIER versions
- is available in the 'Mac Programming' section of this on-line information
- service. A more cost effective method (as opposed to paying download charges)
- of obtaining this, or the latest version, complete with THINK C
- source code is to register your ShareWare support as instructed in
- the 'Mini Advertisement' at the end of this file.
-
- ========================================================================
- BASIC PROGRAM DESCRIPTION
- ========================================================================
- "IFS Decompression" is a graphics program for decompressing a graphic
- picture stored in 'Iterated Function System' format. Supports original
- style 8 color operations (so it runs on Mac Plus, SE and II). Included
- are a normal Mac verison and a 68881 version to take advantage of the
- Mac II's floating point coprocessor to speed up the calculations.
-
- ====================================================================
- SHAREWARE NOTICE
- ====================================================================
- PLEASE SUPPORT THE SHAREWARE CONCEPT by honoring the ShareWare fee
- request. If you use the application or source code for any purpose
- I ask that you submit the modest fee. This small incentive will
- encourage further source code distribution.
-
- To obtain the latest version of ShareWare source code for this applicaton,
- please see the 'Advertisement' at the end of this file.
-
- All commercial rights for this application are reserved by the author,
- but the ShareWare source code may be modified for another, unrelated,
- application without any further claims from this author.
-
- ====================================================================
- DISCLAIMER
- ====================================================================
- This software is provided as-is and is not guaranteed to operate
- Trouble-free in the user's environment.
-
- The user should thoroughly test the application in his/her normal
- operating enviroment PRIOR to running this application along
- with any critical applications and data.
-
- ========================================================================
- MAIN PROGRAM PURPOSE
- ========================================================================
- Much more important than the application is the experience this program has
- provided for learning how to program the Mac.
-
- With the fully commented source code I've provided for many of the difficult to
- learn features of programming the Macintosh. A partial list is given below:
-
- 1) Using modules in THINK C to break the code into modules. Smaller
- modules are easier to maintain. The present program is broken into 3 parts
- and uses a 'resource' file to hold menu, dialog and other information.
-
- 2) Segmentation of code in THINK C to allow for larger programs than
- 32K. Within the THINK environment the application much be split into
- two segments to run.
-
- 3) Growing, Zooming and moving a window.
-
- 4) Multiple window management.
-
- 5) Saving a picture of QuickDraw commands for a drawing window, so the system
- will automatically update the window's picture when resized or obscured by a
- dialog or alert box.
-
- Utilities included are:
-
- procedure StartPic; {start saving QuickDraw format of window into a picture}
- procedure StopPic; {stop saving into a picture record}
- procedure SuspendPic; {temporarily suspend picture copying}
- procedure ResumePic; {resume recording of QuickDraw commands into picture}
-
- 6) Use of a 'resource file' to define menus, dialogs and alerts.
-
- 7) How to open dialogs and alerts in an application.
-
- 8) How to use an application specific menu to activate the application's
- functions.
-
- 9) How to select a file name from an HFS volume to perform an action on it.
-
- 10) How to read and write from TEXT files.
-
- 11) How to use different cursors within your application and how to determine
- when to change the cursor to another one based on the cursor position in
- the window.
-
- 12) How to properly enable and disable MENU items in different parts of the
- application.
-
- 13) How to activate DAs and allow them to run on top of the application.
-
- AND THE LIST IS GROWING!
-
- ===================================================================
- IFS Decompression version 2.1 February 17,1990
- ===================================================================
- A ShareWare Application/Source Code program written in THINK C
- by Stephen Scandalis.
-
- The source code of the application can be modified and used like a
- 'shell' program with many user interface features already present and
- worked out for the programmer.
-
- Thanks to Tim SOS (G.SOS on GEnie) for some of the IFS data files
- distributed with this package.
-
- MAJOR ADDITIONS SINCE VERSION 1.032/1.2 RELEASE
-
- • Bit map images of windows are saved after an image is drawn. This
- feature only works on the Mac Plus (and probably Mac SE) but is
- disabled on the Mac II (it causes a system crash).
-
- • Added an ERASE item to the CONTROL menu which allow you to
- turn off the erasing of the screen between each redraw, this
- allows you to create composite images using different parameters.
-
- • Added a check for a disk insert event during the main event loop
- processing. This allows handling of bad or unformatted disks
- at the time of insertion.
-
- • Still better MultiFinder support.
-
- • Updated the HELP function to display screen numbers.
-
- • Added a simple Virus/Program Corruption checking routine. This
- helps insure that the copy of the program you are running hasn't
- been messed with (maybe indicating the presence of a Virus).
-
- • Added color bit map image saving on-screen to restore image after
- it is obscured.
-
- • Added feature to save color bit map window images for window
- updating on Mac II's (ONLY =WITHOUT= 32 BIT COLOR QUICKDRAW INSTALLED)
-
- MAJOR ADDITIONS SINCE VERSION 2.0 RELEASE
-
- • Updated program to run under THINK C 4.0
-
- • Added application icon for program and document files
-
- • Added version information which will show up with the Finder "Get Info.." command
-
- • Cleaned up the method of exiting program, makes sure DA's are closed
- the right way.
-
- • Added several utility routines to the 'General Utilities.c' file,
- which, while all may not be used in this program, are still usefull.
-
-
- ==================================================================
- RUNNING IFS WITH THINK C OR LIGHTSPEED C
- ==================================================================
- A 'project' is provided for running with THINK C version 4.0 using
- the precompiled 'MacHeaders' file. If running with LightSpeed C 3.xx you
- will need to create a new project and comment out/uncomment a couple of
- lines near the top of each .c file.
-
-
- • The program is broken into three main parts:
-
- 1) IFS Main.c
- 2) IFS Utilities.c
- 3) General Utilities.c
-
- IFS Main.c
- This routine contains the initialization code and the main
- event loop. Events are detected in this routine and passed
- on to other routines for servicing as required.
-
- IFS Utilities.c
- This routine contains application specific routines unique to
- the IFS application. See the header in the file for more
- information.
-
- General Utilities.c
- The routine contains a collection of useful routines of general
- interest to all programs. They aren't specific to this
- application and CAN BE REUSED for just about any other
- application.
-
- =======================================================================
- MINI ADVERTISEMENT
- =======================================================================
- Also look for other source code offerings through the ShareWare program.
- All source code includes extensive comments (Even I need them to remind
- me what I did a week earlier), resource files if used and complete ready to
- run projects to open from Lightspeed/THINK products. So far all programs are
- suitable for use as application shells. Presently two ShareWare programs
- are available suitable for use as an application shell:
-
- =======================================================================
- 'Text Convert'- $10 ShareWare Current Versions are 2.1C and 1.5P
- =======================================================================
- Written in Lightspeed Pascal and THINK C - A simple application to
- convert text file line endings to be Mac or IBM compatible. A nice shell
- program with many Mac features ready to modify for your use. This one is
- nice for those of you learning THINK C who want some examples of
- a Pascal and 'C' program which do the same things. The 'C' version was
- converted as closely as possible directly from the Pascal version.
- Having both helps to understand the conversion of the "Inside Macintosh"
- calls, which are written in Pascal. As of the date of this file the
- versions available are 1.5P and 2.1C which work with Lightspeed Pascal
- 2.0 and THINK C 4.0
-
- NOTE: After version 1.5P (for Pascal) changes have only been made to the
- 'C' version. Therefore a few new features might not have Pascal
- version counterparts.
- =======================================================================
-
-
- =======================================================================
- 'IFSv2.xx'- $15 ShareWare Current Version is 2.1C
- =======================================================================
- Written in THINK C - A graphics program for decompressing a graphic
- picture stored in 'Iterated Function System' format. Supports original style
- 8 color operations (so it runs on Mac Plus, SE and II). Included are a
- normal Mac verison and a 68881 version to take advantage of the Mac II's
- floating point coprocessor to speed up the calculations.
-
- ** If you are mainly looking for a nice Shell program, this is my latest and
- ** greatest, includes radio and check boxes, static text and edit items
- ** inside a dialog to allow modification of program specific variables or
- ** run time options. VERSION 1.2 AND ABOVE INCLUDE BIT MAP COPYING FEATURES
- ** FOR THE MAC PLUS. VERSION 2.0 ADDED COLOR BIT MAP SAVING OF WINDOW IMAGE
- ** FOR WINDOW UPDATING.
-
- As of the date of this file the version available is 2.1 and works with
- THINK C 4.0 and could PROBABLY be converted back to LSC 3.xx
- =======================================================================
-
-
- Both programs, while being useful and fun applications, are really ment to be
- application shells, complete with many Macintosh user interface features of
- interest to many programs. Features include: menus control, multiple
- window operations, WindowPicture saving for automatic window
- information upating, growing, zooming, text file loading and saving, DA
- operation etc.
-
- Look for the compiled applications on GEnie, CompuServe and the MacInfo BBS
- (415) 795-8862. Either program's source code may also be ordered for a ShareWare
- registration fee as specified below. By honoring the ShareWare request for the
- source code, you will encourge further source code releases. The fee is quite
- modest given the benefit provided (savings of hundreds of hours in programming
- time) and helps offset the programming time and connect charges incurred in
- providing these programs to the Macintosh community.
-
- An added benefit of registration is that in many cases the Shareware registration
- fee is less than the connect and phone charges to obtain earlier, less capable,
- versions from CompuServe, GEnie and BBS boards.
-
- If you would like to register your ShareWare support AND obtain the source
- code of the latest version of either program, please send $10 for
- ‘Text Convert’ or $15 for 'IFS' (SPECIAL DEAL of $20 for both).
-
- Please specify which program you want, 'Text Convert' will be in
- both Lightspeed Pascal and THINK C while 'IFSv2.xx' is available in 'C' only.
-
- REMEMBER: If you send $20, you'll get both programs!!
-
- P.S. For those who do not already have it, the source code for the program
- 'ShowOff' in Lightspeed Pascal and C is available as FREEWARE, in the
- Public Domain. 'ShowOff' is a debugging training exercise from the
- book "How To Write Macintosh Software" by Scott Knaster. You can
- find the complete source code on Genie, CompuServe and on the MacInfo
- BBS (415) 795-8862 or ask for it when you request my other programs.
-
- =========================================================================
- If you have questions about something in the source code please contact me
- either at my home address or on GEnie or CompuServe (I only go out every
- couple of weeks, so the Electronic method may take awhile to receive an
- answer)
-
- GEnie: S.SCANDALIS
- CompuServe: 70167,2205 STEPHEN A. SCANDALIS
-
- Armed with this source code a begining programmer should be able to strip
- 'IFS' specific code out and insert their own application specific code.
- It only takes a few hundred lines to actually perform the IFS graphic
- decompression. The rest of the 2000+ lines of code implements the Macintosh
- user interface or allows modification of IFS equations (which can be easily
- modified for a new application).
-
-
- Happy Macing!,
-
- Steve Scandalis
-
-
- =========================================================================
- IFS 2.xx and Text Convert 2.xC/1.5P Order Form
- =========================================================================
-
- ORDER FORM
-
- Name: ________________________________________________
-
- Company: ________________________________________________
-
- Address1: ________________________________________________
-
- Address2: ________________________________________________
-
- Address3: ________________________________________________
-
- City: ________________________________________________
-
- State: ________________________________________________
-
-
- PROGRAM Cost Each Cost Times No. Ordered
-
- IFS $15 _________
-
- Text Convert $10 _________
-
- Discount for (-$5) (- _________)
- ordering BOTH
-
- Shipping & Handling
-
- USA (included) $0 _________
-
- Foreign $2/program _________
-
- TOTAL _________
-
-
- Please send check (in US Funds) to:
-
- Stephen Scandalis
- 1414 Prince Edward Way
- Sunnyvale, CA 94087
-
- =========================================================================
-